package org.itboys.trade.entity;

import java.util.Date;
import java.util.List;

import org.itboys.mongodb.entity.BaseLongIdEntity;

import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;

/**
 * 订单实体对象
 * @author 伟哥
 *
 */
@Entity(value = "TicketOrder", noClassnameStored = true)
public class TicketOrder extends BaseLongIdEntity{

	private static final long serialVersionUID = -5899973200559262162L;
	public static final int status_create=1;
	public static final int status_payed=2;
	public static final int status_success=3;
	public static final int status_comment=4;
	//退款状态参考orderConstants
	public static final int pay_type_alipay=1;
	public static final int pay_type_wx=2;
	
	public static final int type_ms=2;
	public static final int type_njl=5;
	public static final int type_jd=4;
	@Indexed
	private String orderNo;//订单编号,唯一
	@Indexed
	private Long sellerId;//订单产生时关联的店铺id
	@Indexed
	private String sellerName;
	@Indexed
	private Long memberId;//会员ID
	@Indexed
	private Long centerId;
	private Integer status = status_create;// 订单状态
	private Date finishedTime;// 完成时间
	private int totalFee = 0;// 总价(各种商品金额相加后的总价) 以"分"为单位
	private int fee = 0;//优惠了金额   以"分"为单位
	private int points=0;
	private int ensureAmount=0;//保险金额
	private int totalMoney = 0;//总价（-优惠金额  + 邮费后  +保险金额） 以"分"为单位
	private int withAmount=0;//门店提现金额（totalMoney-佣金）
	private List<Integer>ensures;
	private String memo; // 订单备注
	private int payType;
	private Date payTime;// 付款时间
	private Date cancelTime;// 取消时间
	private String cancelReason;// 取消原因
	private String returnReason;// 退货理由
	private List<Long>memberInfos;
	private Long voucherId;
	private String name;
	private String mobile;
	@Indexed
	private String code;
	private int type;
	public String getOrderNo() {
		return orderNo;
	}
	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}
	public Long getSellerId() {
		return sellerId;
	}
	public void setSellerId(Long sellerId) {
		this.sellerId = sellerId;
	}
	public Long getMemberId() {
		return memberId;
	}
	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Date getFinishedTime() {
		return finishedTime;
	}
	public void setFinishedTime(Date finishedTime) {
		this.finishedTime = finishedTime;
	}
	public int getTotalFee() {
		return totalFee;
	}
	public void setTotalFee(int totalFee) {
		this.totalFee = totalFee;
	}
	public int getFee() {
		return fee;
	}
	public void setFee(int fee) {
		this.fee = fee;
	}
	public int getWithAmount() {
		return withAmount;
	}
	public void setWithAmount(int withAmount) {
		this.withAmount = withAmount;
	}
	public int getTotalMoney() {
		return totalMoney;
	}
	public void setTotalMoney(int totalMoney) {
		this.totalMoney = totalMoney;
	}
	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	public Date getPayTime() {
		return payTime;
	}
	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}
	public Date getCancelTime() {
		return cancelTime;
	}
	public void setCancelTime(Date cancelTime) {
		this.cancelTime = cancelTime;
	}
	public String getCancelReason() {
		return cancelReason;
	}
	public void setCancelReason(String cancelReason) {
		this.cancelReason = cancelReason;
	}
	public String getReturnReason() {
		return returnReason;
	}
	public void setReturnReason(String returnReason) {
		this.returnReason = returnReason;
	}
	public List<Long> getMemberInfos() {
		return memberInfos;
	}
	public void setMemberInfos(List<Long> memberInfos) {
		this.memberInfos = memberInfos;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public int getPayType() {
		return payType;
	}
	public void setPayType(int payType) {
		this.payType = payType;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getSellerName() {
		return sellerName;
	}
	public void setSellerName(String sellerName) {
		this.sellerName = sellerName;
	}
	public Long getVoucherId() {
		return voucherId;
	}
	public void setVoucherId(Long voucherId) {
		this.voucherId = voucherId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public Long getCenterId() {
		return centerId;
	}
	public void setCenterId(Long centerId) {
		this.centerId = centerId;
	}
	public int getEnsureAmount() {
		return ensureAmount;
	}
	public void setEnsureAmount(int ensureAmount) {
		this.ensureAmount = ensureAmount;
	}
	public List<Integer> getEnsures() {
		return ensures;
	}
	public void setEnsures(List<Integer> ensures) {
		this.ensures = ensures;
	}
	public int getPoints() {
		return points;
	}
	public void setPoints(int points) {
		this.points = points;
	}
	
	
}
